﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace coliseu
{
    public partial class FrmLogin : Form
    {
        public FrmLogin()
        {
            InitializeComponent();
        }

        private void FrmLogin_Load(object sender, EventArgs e)
        {
            StreamReader objReader = new StreamReader(Application.StartupPath +"\\config.ini");
            string server = objReader.ReadLine().Replace("LOCAL_BANCO: ","");
            Properties.Settings.Default.conn_coliseu =
"metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string=\"data source=" + server + ";initial catalog=coliseu;persist security info=True;user id=crixus;password=123*abc;multipleactiveresultsets=True;App=EntityFramework\";";

            Properties.Settings.Default.conn_coliseu_municipio =
"metadata=res://*/coliseu_municipio.csdl|res://*/coliseu_municipio.ssdl|res://*/coliseu_municipio.msl;provider=System.Data.SqlClient;provider connection string=\"data source=" + server + ";initial catalog=coliseu_municipio;integrated security=True;multipleactiveresultsets=True;App=EntityFramework\"";


        }

        private void button2_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }
    }
}
